/**
 * 
 */
package uk.ac.manchester.cs.graph;

import java.util.Comparator;

/**
 * @author Pavel Klinov
 *
 * pklinov@cs.man.ac.uk, pklinov@clarkparsia.com
 * 
 * Nov 7, 2008
 */
public interface Stack<T> extends Iterable<T> {

	public void push(T object);
	public T pop();
	public T peek();
	public Entry<T> find(T object);
	public Entry<T> find(T object, Comparator<T> comparator);

	class Entry<T> {
		
		private T m_object = null;
		private int m_depth = -1;
		
		Entry(T object, int depth) {
			
			m_object = object;
			m_depth = depth;
		}
		
		public T getObject() {
			
			return m_object;
			
		}
		
		public int getDepth() {
			
			return m_depth;
		}
	}
}
